[CA_COLOR_OPAQUE] things that make a layer non-opaque. scaled CAGradientLayer?

Posted by mahal tertin on Stack Overflow See other posts from Stack Overflow or by mahal tertin
Published on 2010-04-15T12:14:39Z Indexed on 2010/04/23 22:03 UTC
Read the original article Hit count: 242

i spent some time with the environment variable CA_COLOR_OPAQUE = 1 and have my findings to share.

things that make a CALayer non-opaque (slow, more memory, ...): * contents with alpha (like an NSImage with an icon) * NSImage/CGImage from a pdf as contents (even when the pdf does not contain any alpha and opaque=YES) * backgroundColor = nil * CATextLayer with text in a (because it is contents with alpha) * rounded corners? maybe/sometimes * masksToBounds? not necessarily

as we scale most of tree with CATransform3DScale on sublayerTransform i found also these rather irritating non-opaque: * CAGradientLayer that is somewhere down in this scaled tree (even when set all the gradient colors without alpha) * edgeAntialiasingMask != 0 of a layer that is somewhere down in this scaled tree

the last two do not make sense to me. why should it be non opaque? what do i see?

if anyone has any thoughts on these findings, i'm happy to learn as i couldn't find such a list yet.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about quartz-graphics